added professional tone - #906
Open
AniketR10 wants to merge 1 commit into
Open
Conversation
AniketR10
requested review from
Avtrkrb,
akramcodez and
will-lamerton
as code owners
August 19, 2026 19:55
Author
|
@akramcodez plz review |
Collaborator
|
Hey @AniketR10, I went through the latest PR and did a review. Everything looks good from my side - the implementation is clean, well-tested, documented, and follows the existing patterns in the codebase. I don't see any blocking issues. There are just a couple of minor points we can discuss around the prompt rebuild behavior and a few test improvements, but nothing that blocks the feature. Let's have a quick discussion on those points, and after that we'll consider it for merging. Nice work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a
professionalTonepreference that switches Nanocoder to a strictlyfunctional, "boring" output style. Closes #896.
When enabled:
Completed in 12s.instead ofWorked for a plucky 12s.## TONEsection instructing the model to stayterse: no preamble ("Sure!", "Let me..."), no narration of what it is about
to do, no celebratory wrap-ups, no emoji, facts only.
Toggle lives at
/settings→ Behavior → Professional Tone, andpersists to
nanocoder-preferences.jsonas"professionalTone": true.Two notes for reviewers:
every spinner label (
Loading...,Executing tool:,Cancelling...) isalready plain, so the issue's "simplify the progress spinner text" had
nothing else to act on.
switch, or restart), not mid-session, because
useChatHandlercaches thebase prompt for KV-cache stability. This matches how
reasoningExpandedandalternateScreenalready behave when changed from the settings panel, andis documented in
docs/configuration/preferences.md.Files
source/types/config.ts—professionalTone?: booleanonUserPreferencessource/config/preferences.ts—getProfessionalTone/updateProfessionalTonesource/utils/completion-note.ts—buildCompletionNote, wired intoconversation-loop.tsxsource/app/prompts/sections/professional-tone.md— the TONE sectionsource/utils/prompt-builder.ts— gates the section on the preferencesource/app/components/settings-tabs.tsx— Behavior-tab toggledocs/configuration/preferences.md— documentedType of Change
Changeset
pnpm changeset) describing this change for the changelogTesting
Automated Tests
.spec.ts/tsxfilespnpm test:allcompletes successfully)8 new tests across
preferences.spec.ts(persistence, default-when-unset,preserving unrelated keys),
completion-note.spec.ts(both phrasings, minuteformatting),
prompt-builder.spec.ts(section present/absent, ordering beforethe system-info block), and
settings-tabs.spec.tsx(row renders on theBehavior tab).
test:alldoes not complete on this branch — but it does not complete on aclean
maineither. I ran the full AVA suite both ways and diffed the failurelists:
test:format,test:types,test:lintandtest:knipall pass.Manual Testing
Manually verified with Google Gemini (
gemini-2.5-flash): toggled thesetting in
/settings→ Behavior, confirmed"professionalTone": truepersisted to the preferences file, and confirmed the completion note switches
phrasing. Also verified the prompt wiring directly:
node -e "import('./dist/utils/prompt-builder.js').then(m=>console.log(m.buildSystemPrompt('normal',undefined,['read_file']).includes('## TONE')))"which prints
truewith the preference on andfalsewith it off.Checklist